import ajax from "./ajax";
export const reqRegister = (user) => ajax('/register', user, 'POST')
export const reqLogin = (user) => ajax('/login', user, 'POST')
export const reqUpdateUser = (user) => ajax('/update', user, 'POST')
// 根据cookie查看用户信息
export const reqUser = () => ajax('/user')
// 大神/老板列表
export const reqUserList = (type) => ajax('/list', { type })
// 请求当前用户所有聊天记录
export const reqChatMsgList = () => ajax('/msglist')
// 标识查看了指定用户发送的聊天信息
export const reqReadMsg = (from) => ajax('/readmsg', { from }, 'POST')